#!/bin/sh
echo "Begin checking the system service with netstat command"
echo -e "The www, ftp, ssh, and mail will be detect it"
testing=$( netstat -tuln |grep ":80")
if [ "$testing" != "" ]; then
   echo "www serverice is running, port 80"
else
  echo "www service is NOT running"
fi

testing=$( netstat -tuln | grep ":3306" )
if [ "$testing" != "" ]; then
  echo "Mysql Service is running, port 3306"
else
 echo "MySql service is NOT Running"
fi
